<html>
    <head>
        {foreach item=category from=$cat}
            {assign var='category' value=$category}
        {/foreach}


        {literal}
        <link href="css/fontstyle.css" rel="stylesheet" type="text/css" charset="utf-8" />
        <link href="css/style.css" rel="stylesheet" type="text/css" />
        {/literal}
    </head>

    <body>
        <!-- <div id="spacer"></div> -->

        {* start package list *}
        {* ------------------ *}
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                {foreach from=$packages key=myId item=p name=package}

                <td width="35%" align="center" valign="top">
                    <a href="packagedetail.php?id={$p.id}&destid={$p.dest_id}">
                        <div class="packageframer">
                            <div>
                                <img src="{$p.image}" class="packageimage" />
                            </div>
                            <div class="specialofferimg">
                                {if $p.isspecialoffer}
                                <img src="images/special_offer.png" />
                                {/if}
                            </div>
                        </div>
                        <div class="fromprice">from {$p.currency}{$p.pricestart|number_format:0:",":"."}</div>
                        <div class="packagetitle">{$p.title|upper}</div>
                        <div class="packageperiod">Period :
                            {assign var='startdate' value=strftime($p.yearstart|cat:'/'|cat:$p.monthstart|cat:'/16')}
                            {assign var='enddate' value=strftime($p.yearend|cat:'/'|cat:$p.monthend|cat:'/16')}
                            {$startdate|date_format:"%b"} - {$enddate|date_format:"%b"} {$p.yearend}
                        </div>
                        <div class="packagereadmore">
                            See Detail
                            <img class="packagereadmorearrow" src="images/details_arrow.jpg" />

                        </div>
                    </a>
                </td>

                    {if ($smarty.foreach.package.index+1) % 3 == 0}
            </tr>
            <tr>
                    {/if}

                    {if $smarty.foreach.package.last && $smarty.foreach.package.index < 3}
                        {section name=i start=1 loop=(3-$smarty.foreach.package.index) step=1}
                <td width="30%">&nbsp;</td>
                        {/section}
                    {/if}

                {/foreach}
            </tr>            
        </table>



        {* ---------------- *}
        {* end package list *}
    </body>
</html>